<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">	
			<a class="mui-icon mui-icon-back mui-action-back mui-pull-left"></a>
		</header>
		<div class="mui-content">
			<video id="video" style="width:100%;" autoplay controls onerror="videoError(event);"></video>
		</div>
		<nav>
			
		</nav>
		<script src="../js/mui.min.js"></script>
		<script type="text/javascript">
			mui.init();
			
			var v=null;
			mui.plusReady(function(){
				var self = plus.webview.currentWebview();
				v = document.getElementById("video");
				v.src = self.src;
				v.play();
			})
			
			function videoError(e) {
				switch (e.target.error.code) {
			     case e.target.error.MEDIA_ERR_ABORTED:
			       alert('You aborted the video playback.');
			       break;
			     case e.target.error.MEDIA_ERR_NETWORK:
			       alert('A network error caused the video download to fail part-way.');
			       break;
			     case e.target.error.MEDIA_ERR_DECODE:
			       alert('The video playback was aborted due to a corruption problem or because the video used features your browser did not support.');
			       break;
			     case e.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:
			       alert('The video could not be loaded, either because the server or network failed or because the format is not supported.');
			       break;
			     default:
			       alert('An unknown error occurred.');
			       break;
			   }
			
				plus.nativeUI.alert( "无效的视频资源", function(){
					plus.webview.currentWebview().close();
				} );
			}
		</script>
	</body>

</html>